home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / calctp.com / META3.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-11-04  |  1.7 KB  |  56 lines

  1. Unit Meta;
  2. Interface
  3.  
  4. Uses Fastwr;
  5.  
  6.   {FastWrite is a Public Domain text display Package By Brian Foley
  7.    available on Compuserve. GO BOR-100, the file is in LIB 2.  You may
  8.    modify the routines to use any other procedure you want.  FASTWR.TPU
  9.    has proven itself to be bug free and FAST! }
  10.  
  11.  
  12. Var
  13. MetaPos, LastLine : Integer;
  14.  
  15. {LastLines value MUST be assigned here in the Meta file.  It defines the lower
  16.  border of the window around the metaphor.  Therefore the maximum should be 25
  17.  and the minimum should be Row 7 for a minimal window around the inner frame.
  18.  
  19.  MetaPos is a global variable used by CALC.TPU to reposition the window when
  20.  moved on screen. }
  21.  
  22. Procedure DrawCalculator;
  23.  
  24. Implementation
  25.  
  26.  
  27. Procedure DrawCalculator;
  28. Begin
  29.  
  30.   {Usage: procedure FastWrite(St : string; Row, Col, Attr : Byte);
  31.    The Row value of 1 is reserved for the the CALC.TPU generated window.
  32.    The width is also fixed in this release of CALC.TPU, but you may change
  33.    the value of LastLine to modify the window size, from the bottom up.
  34.    The calculator always remains anchored to the top of the screen. }
  35.  
  36.   FastWrite('╔════════════════════════╗',3,MetaPos,7);
  37.   FastWrite('║                        ║',4,MetaPos,7);
  38.   FastWrite('╚════════════════════════╝',5,MetaPos,7);
  39.  
  40.   {Unless you want only the result in its own small window, use this
  41.   "inner window" to frame the numeric data, which allways appears on Row 4.}
  42.  
  43.   FastWrite(' Esc Quits, F10 to Paste',6,MetaPos,15);
  44. end;
  45.  
  46. Begin
  47. (* Meta*)
  48. LastLine := 7;
  49.  
  50. { Lastline Must be set to define the position of the bottom of the window.
  51.   Note that it is one more that the last row in the FastWrite calls above. }
  52.  
  53. end.
  54.  
  55.  
  56.